<%@ include file="../global_pages/header.jsp"%>

<s:form action="viewResource" method="post" name="viewResource">
	<s:hidden key="resource.id" cssClass="underline" id="viewResource_resource_id"></s:hidden>
</s:form>

<s:form action="deleteResource" method="post" >
	<s:hidden key="idArrays"></s:hidden>
</s:form>

		<ec:table 
				items="list"
				var="pojo"
				action="${pageContext.request.contextPath}/resource/listResource.shtml"
				imagePath="${pageContext.request.contextPath}/images/table/*.gif"
				width="98%"
				filterable="true"
				rowsDisplayed="10"
				view="compact"
				locale="${language}_${country}"
				>
			<ec:row highlightRow="true">
				<ec:column property="id" filterable="false" width="2%" title="<input type=checkbox onclick=\"for( i=0 ; i<this.form.elements.length ; i++){if (this.form.elements[i].name=='idArray'){this.form.elements[i].checked=this.checked;}}\"/>"  sortable="false">
					<input type=checkbox name="idArray" value="${pojo.id}"/> 
				</ec:column>
				
				<ec:column property="name" filterable="true" title="title.name">
					<a href="#" onclick="toView(${pojo.id})">
						${pojo.name}
					</a>
				</ec:column>
				<ec:column property="code" filterable="true" title="title.code"/>
				<ec:column property="resource" filterable="true" title="title.resource"/>
				<ec:column property="descn" filterable="true" title="title.descn"/>
			</ec:row>
		</ec:table>
	<tr>
	    <td>
	    <button type="button" onclick="doSelect(deleteResource);"><s:text name="button.delete"/></button>
	    </td>
    </tr>

<%@ include file="../global_pages/footer.jsp"%>